From: Adam Borowski Date: Tue, 30 Jul 2024 13:09:54 +0000 (+0200) Subject: Properly detect x32. X-Git-Tag: archive/raspbian/2%0.165.3223+git20250910.0480cb0-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi//%22https:/www.google.com/search/%22http:/www.example.com/cgi/%22https:/www.google.com/search?a=commitdiff_plain;h=674593f8e4c2bf9e9601d1452ff302fb9082f7e2;p=x264.git Properly detect x32. As usually, x32 gets mistaken for amd64 (both are x86-64 ABIs after all). This version doesn't use any assembly yet, a proper port is needed. Gbp-Pq: Name 0001-properly_detect_x32.patch --- diff --git a/common/common.h b/common/common.h index a22e224..6d935c6 100644 --- a/common/common.h +++ b/common/common.h @@ -804,7 +804,7 @@ static ALWAYS_INLINE int x264_predictor_clip( int16_t (*dst)[2], int16_t (*mvc)[ return cnt; } -#if ARCH_X86 || ARCH_X86_64 +#if ARCH_X86 || ARCH_X86_64 || ARCH_X32 #include "x86/util.h" #endif diff --git a/configure b/configure index d1d0a47..48c22f2 100755 --- a/configure +++ b/configure @@ -759,6 +759,10 @@ esac LDFLAGS="$LDFLAGS $libm" +case `$CC -dumpmachine` in + *gnux32) host_cpu=x32 +esac + stack_alignment=4 case $host_cpu in i*86) @@ -815,6 +819,10 @@ case $host_cpu in ASFLAGS="$ASFLAGS -f elf64" fi ;; + x32) + ARCH="X32" + CFLAGS="$CFLAGS -fPIC" + ;; powerpc*) ARCH="PPC" if [ $asm = auto ] ; then